﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;

namespace IRC.IRepairClouds.DataLayer
{
    partial class EPartner
    {
        public enum Partner : int
        {
            GreeNova = 1,
            HP = 2
        }

        public static Expression<Func<EPartner, bool>> SelectorByPartnerId(Guid partnerId)
        {
            return i => i.PartnerId == partnerId;
        }

        public static EPartner Get(ICloudRepairEntities dbContext, Guid partnerId)
        {
            return Get(dbContext, partnerId, null);
        }

        public static EPartner Get(ICloudRepairEntities dbContext, Guid partnerId, DbInclude<EPartner> include)
        {
            return dbContext.Partners.Get(false, include, SelectorByPartnerId(partnerId));
        }
    }
}
